Machine processing of algebraic information

ABSTRACT

A method and apparatus are disclosed for improving the efficiency of processing and storing algebraic and similar information in a data processor. Polynomial information is treated as an array of coefficient and exponent information subject to machine boundary conditions, user format statements and linking signals. Dynamic storage allocation and exponent overflow are also provided.

United States Patent Inventor William S. Brown Chatham, NJ.

Appl. No. 400,370

Filed Sept. 30, 1964 Patented Oct. 19, 1971 Assignee Bell Telephone Laboratories Incorporated New York, N.Y.

MACHINE PROCESSING OF ALGEBRAIC INFORMATION 9 Claims, 26 Drawing Figs.

US. Cl 235/168, 235/156, 340/172.5 Int. Cl ..G06f 7/385, G06f 7/39, G06f 7/00 Field of Search 235/168,

References Cited OTHER REFERENCES P. Wegner An Introduction to Symbolic Programming 1963 pp. 70 71 IBM 7090/7094 Programming Systems Fortran II Assembly Program,pp. l-l 1, l962, Form #C28-6235-4.

Primary Examiner-Malcolm A. Morrison Assistant Examiner-David H. Malzahn AttameysR. J. Guenther and William L Keefauver ABSTRACT: A method and apparatus are disclosed for improving the efficiency of processing and storing algebraic and similar information in a data processor. Polynomial information is treated as an array of coefficient and exponent information subject to machine boundary conditions, user format statements and linking signals. Dynamic storage allocation and exponent overflow are also provided.

STORAGE REGISTER ADDER OR l NETWORK I NETWORK 52-3 I I 52-4 I R52-5,

i I I l ACCUMULATOR REGISTER PATENTEDIEHSEH I 3.614.406

SHEET UlUF 19 FIG. 1A

REFERENCE LOCATION OPERATION OPERAND/VARIABLE NO. FIELD FIELD FIELD lO-l POLBEG SIZE 10-2 POLRDF FORMAT 1O-3 POLRDD P,FORMAT 10-4 POLROD O,EORMAT POLMPY R, P,Q

10-6 POLPRT R 10-1 N EQU 2O lO-8 FORMAT BSS N FIG. 1B

MEMORY LOCATION STORAGE ASSIGNMENT BE-SYS-3 MONITOR 100 101 ASSEMBLER OPERATING ROUTINES 17132 20000 SYMBOL v L 2 L. BE-FAP MACRO ASSEMBLER TABLE 5 777 52000 ASSEMELER OPERATING ROUTINES 5 1107 5 1110 COMBINED OPERATIONS TABLE 5603 1 4 60000 BE-SYS-3 MONITOR INVENTOR. W 5. BROWN BY 17.8 K

A T TORNE V PATENTEIJUU 19 An SHEET DEUF 19 FIG. 10-1 LOCATION STORAGE ASSIGNMENT D1. O A O 5 BE-SYS-3 Z O z 100 (POLBEG) TRANSFER I VECTOR I l PZE SIZE }CALLING I PZE CR1 SEQUENCE z I 0'1 (5 O 2i FORMAT FORMAT z STATEMENT H I 2 i E P OF POLYNOMIAL P DATA BUFFER Q READING I POINTERS 1 OF POLYNOMIAL R i YL A m BU FER LOCATION B VARIABLE UPPER DATA DATA BUFFER BUFFER LOCATION STORAGE POLBEG POINTERS C VARIABLE LOwER DAT 1 BUFFER LOCATION D FlXbD LOwER DATA BUFFER LOCATION V RUTH E V RIA'B'FES INTERNAL W COUNTING COUNTING LOCATI NS L C TIONS W m' POLRDF OF VARIABLES GIVEN I BY FORMAT STATEMENT REFERENCES 'UIHER'IN'IERNALL'OC'A'TIONS To FORMAT REFERRING TO FORMAT STATEMENT STATEMENT I A W T E INTERNAL FORMAT INFORMATION Y BUFFER L PATENTEU C 1 3. 6 14.406 SHEET 03 0F 19 I FIG. 1C-2 LOCATION STORAGE AssIGNMENT HA m I IN BUFFER sTORE REFERENCE MHER EOCHIORB, 55.25., LOCATIONS l I BIT, FOR DATA BUFFER LOwER BOUND J C EFF 'COEFFICIEN'I'75F POLYNOMIAL TERM TEMPORARY CW STORAGE POLRDD E.G., EXP, FOR EXPONEN'IS J N PER TERM COUNTING LOCATIONS TIONS, E.G., 2V FOR DOUBLE NUMBER OF j VARIABLES PS m :4 FOR PARTIAL sUM REFERENCE 'OT" RER READ'I NG LOCTTI'O' N"S, READING S 8.0. TI P R LOCATIONS B BUFFER APLDRESS gggfig gfig gfi OTRER REFERENCE LOCA- DATA BUFFER TIONs, E.G., C, DATI, J' DAPS GAP I POLMPY BUFFER COUNTING WEEK CW LOCATIONS TIONs, E.G. NQ, NP, w wwQ wwMAx ,l Lsw. INDICATOR BUFFER STORAGE FOR LOCATION LEAPFROG METROD PI READING DAPI DATA ADDREss OF PI FA FORMAT ADDREss PATENTEDHE 19 ml 3,614,406

SHEET OR (IF 1 9 FIG 10-3 POLPH'I J ALPAK NOT USED FIXED UPPER DATA BUFFER LOCATION,

+ VARIABLE UPPER DATA BUFFER LOCATION VARIABLE LOWER DATA BUFFER LOCATION FIXED LOWER DATA BUFFER LOCATION DATA BUFFER BE -SYS 3 MONITOR PATENTEU 19 3,614,406

SHEET 05 [1F 1 9 FIG. 2A

POLBEG MACRO REFERENCE LOCATION OPERATION OPERAND/VAR'LABLE NO. FIELD FIELD FIELD 20-1 POLBEG MACRO sIZE,CR1

20-2 CALL FOLEEG,.$;I2E,CM|

20-3 COMMON f", '/.E1. 20-h CH1 COMMON 1 20-5 END MACRO FIG. 2B

- 21-1 TSX POLBEG,I.R

21-2 PZE SIZE 21-3 PZE CR1 FIG. 20

22-1 POLBEG CLA 2, 4

22-2 STA A 22-3 STA B 22 ADD l,

22-5 STA C 22-6 STA D 2-? TRA 3,

FIG. 3A

POLRDF MACRO FORMAT CALL POLRDF,FORMAT END POLRDF PAIEmEuucmA 3,614,406

' sum UBUF 19 FIG. 3B

INITIALIZE INTERNAL STORAGE OF SUBROUTINE (506-515) READ FORMAT DATA FROM CARD INTO INTERNAL BUFFER SET INDEX REGISTERS (522-528) PROCESS CHARACTERS OF VARIABLE NAME AND STORE AT NEXT AVAILABLE FORMAT LOCATION READ DATA FROM ANOTIIJEIR CARD INTO INTERNAL JZUFI I'JR (T -5'15) TEST WHETHER DATA FROM CARD EXHAUSTED TEST FOR INTEGER FIELD FOLLOWING VARIABLE NAME; PROCESS AND STORE AT NEXT AVAILABLE FORMAT LOCATION COMMA, NON-BLANK CHARACTER READ AND TEST NEXT CHARACTER (623-648) BLANK, NO COMMA COMMA, BLANK FILL IN FIRST 'IWO WORDS! OF FORMAT (051-65 4) CONSTRUCT MAS (656-683) PAIENTEnum 19 L9H 3.614.406

SHEET 07DF 19 FIG. 3C

SET INDEX REGISTER IN TERMS OF NUMBER OF VARIABLES GENERATE ADDRESS FROM WHICH THE FORMAT LOCATIONS OF THE BIT SIZES OF THE M-TH AND M 1ST VARIABLES CAN BE DETERMINED WITH RESPECT TO THE INDEX REGISTER (658-662) ZERO SELECTED STORAGE LOCATIONS (663-665) ENTER "1" INTO RIGHT-HAND MASK POSITION OF FORMAT STATEMENT SUPPLEMENT EXPONENT BIT TOTAL BY SIZE OF M-TH VARIABLE SHIFT MASK CONTENTS BY 36 N0.0F BITS INDICATED FOR M 1ST VARIABLE EXPONENT BIT TOTAL ESTABLISH NEXT AVAILABLE ADDRESS IN FORMAT STATEMENT FOR ALL VARIgBIiES ACCOUNTED PAIENTEuunI 19 N11 3,614,406

A sum 08UF19 FIG. 31)

LocATIoN STORAGE I POLPRT FORMAT NUMBER OF EXPONEN'I w0RDs NUMBER OF VARIABLES PER POLYNOMIAL 3) B01 OF FIRST VARIABLE (x 67 MAXIMUM NUMBER 0F BITs IN EXPONENT OF FIRST VARIABLE (B 1501 OF SECOND VARIABLE (Y 70 MAXIMUM NUMBER OF BITS IN EXPONENT OF SECOND VARIABLE 1N BCI OF TRIRD VARIABLE (z 7.1

MAXIMUM NUMBER OF BITs IN EXPONENT 0F THIRD VARIABLE (R. 0 0

MASK F0R B TRROUGR B (B 18, B 12, B 6 MASK 000001000101 P HEADING ADDRESS OF POLYNOMIAL P END PATENIEUum 19 Ian SHEET [19 0F 1 9 FIG. IB-1 INITIALIZE (718) POLYNOMIAL READING NONZ ERO" TRANSFER TEST FOR READING CLEAR SPACE INSUFFICIEN'I SPACE (192-197) SPACE (211-317) TES'\ SUFFICIENT SPACE FOR READING SPACE (202-208 CREATE READING AND STORg ADDRESS 1 -1 2 INSUFFICIENT SPACE PARTIALLY FILL INSUFFICIENCY READING RETURN (721-738) 9) GENERATE EXPONENT CONVERSION SIGNALS INITIALIZE SYSTEM READING ROUTINE (7 10-7 17) SORT UPPER OLYNOMIAL TERM PORTION OF ND TEST COEFFICIENT ZER0 DATA BUFFER FROM 79 FIG. B-2

TO(761) FIG. LIB-2 NON-ZERO PAIENTEnnm 19 Ian 0 To (748) FIG. 413-1 SHEET 10 0F 1 9 FIG. 413-2 FROM (751) FIG. 413-1 SET INDEX REGISTERS (761Yb3) VARIABLES REMAINING CONVERT, PACK AND STORE AN EXPONENT OF A TERM (764-7 TEST MAXIMUM BIT COUNT O1 EXPONI'JNTS (782-183) TEST COUNT OF VARIABLES IN TERM (7 INCREMEN'I NUMBER OF TERMS INDICATED BY HEADING AND TRANSFER (790-79 0 ALL VARIABLES ACCOUNTED FOR INCREMJCN'I NEXT AVAYIILAHLJG UPPER PATENTEDUBI ISIS?! 3.614.406

SHEET llUF 19 FIG. QC

LOCATION STORAGE ASSIGNMENT P HEADING OF POLYNOMIAL P Q HEADING OF POLYNOMIAL Q JL V MAIN PROGRAM A *A FIXED UPPER BOUND OF DATA BUFFER B *B NEXT AVAILABLE UPPER BUFFER ADDRESS E3 C *C NEXT AVAILABLE HEADING ADDR ss D *D FIXED LOWER BOUND OF DATA BUFFER *B *A (COEFFICIENT WORD) 1 T (EXPONENT WORD) O l O L COEFFICIENT O AND EXPONENT 1 WORDS O O A l 3 1 l O Q 2 Di 2 O O P *B'= *A+l0 E3 F A E-a I: Q *C *D 6 *A+l4 FORMAT Q 3 POLYNOMIAL *c *D3 (DATA ADDREss) *A HEADING (FORMAT ADDREss)FoRMAT P (NO. OF TERMS) 2 *C *D LOWER TERMINUs OF DATA BUFFER 2 Q 2x 3XY z P Y X PATENTEDum 19 I9?! sum 12 [1F 19 FIG. ID-l PRELIMINARY INITIALIZATION TEST HEADING OF POLYNOMIAL ADDITIONAL INITIALIZATION ESTABLISH BLOCK To BE SORTED (1057-1060) 1 INTERCHANGE COEFFICIENT 8c FIRST EXPONENT wORD OF EACH TERM IN BLOCK 1 CALL SYSTEM SORT I RESTORE ORIGINAL COEFFI- CIENT XPONENT RELATION- SHIP (10253-1089) TEST NO. OF COEFF. WORDS AGAINST SORTINC INDEX ESTABLISH SUB-BLOCK I UPDATE SORTING INDEX K RESTORE BLOCK (1138-11 16) J TEST FOR ..AST SUB-BLOCK (11 47-11 48) YES SORT SUB-BLOCK (MES 37) I PATENTEDMJT 19 Ml 3,614,406

SHEET 13 [1F 19 FIG. 4D-2 PREPARE TO COMPARE TERMs I AND J (9&6-961) COMPARE COMBINE TERM I EXP. OF TERM EQUAL wITR TERM J I wITR EXP. (1005-1009) OF TERM J A (980-98 NON- UNE UAL ZERO INOREMENT J TEST .1NCHEMENT (989) FOR ZERO I 1 (L010 (1012.2) MOVE TERM I TO POSITION OF TERM J IF TRERE RAD BEEN AN EARLIER ZERO FINDING OF I EQUALITY (99 -99 1 DEOR MENT ADJUST N, NO. OF TERMS IF TRERE RAD BEEN AN EARLIER FINDING OF EQUALITY I (1015-1028) TEsT 'IF RESULTING POLY. Is CONSTANT AND RETURN (1031-1038) FIG. 5A

LOCATION OPERATION OPERAND/VARIAELE FIELD FIELD v FIELD POLMPY MACRO R, P,Q

CALL POLM Y PzE R PZE P PzE Q END PATENTEDOET 191911 4,406

SHEET 1" HF 19 FIG. 5B

LOCATION STORAGE ASSIGNMENT *A DATA ADDRESS OF PO} y P v NP=2 TERMS DA A ADDRESS OF P1 *B *A+ & Z Q

NQ=3 TERMS 3XY 2x DATA ADDRESS OF PS 2 Y2 Y2 FIRST, OR n 3XY2 xz NP-lST BLOCK 2x 2x y 3x51 1 =T +T DATA ADDRESS OF PS0 T MP0! SECOND, OR 3XY2 2X NP-TH q BLOCK exy PS0=TO :QPO

DATA ADDRESS OF T x2: THIRD, OR 3x Y T =QP NP+1ST BLOCK 2X3 *C *D-12 READING FOR PS *0 *D- 9 HEADING FOR R *C *D- 6 HEADING FOR O 3 1 HEADING FOR P Pmmtnumman 3.614.406

SHEET lSUF 19 FIG. 5C

INITIALIZATION AND DETERMINATION OF REQUIRED DATA BUFFER SPACE (132A-1A27)II FIG. 5D-1 NADEQUATE SPACE BUFFER AND TTEMPT TO PROVIDE ADEQUATE SPACE FOR LEAPFROG PROCESSING (1A28)II (21A-297)FIG.5D-

ADEQUATE SPACE INITIALIZE INTERNAL STORAGE LOCATIONS FOR LEAPFROG METHOD COMPUTE ZERO ORDER PARTIAL SUM AND PAR- TIAL PRODUCT PS ==T luuo-luuum FIG. 5D-3 PREPARE FOR AND COM- PUTE SUBSEQUENT PAR- TIAL PRODUCT (1A50-1A56)II PREPARE FOR AND OM- 1 PUTE PARTIAL SUM OF PREVIOUS PARTIAL SUM AND PRESENT PARTIAL PRODUCT (1 462-1A69)II INCOMPLETE TEsT FOR COMPLETION l WO-l WDII C OM PLETE PATENTEDEIBT 19 IBTI 3.614.406

' sum IB-UF 19 FIG. 5D 1 INITIALIZE INTERNAL STORAGE OF SUBROUTINE (132A-133O)II CREATE HEADING FOR RESULTANT POLYNOMIAL (1321-1332)II POLYNOMIAL P OR Q. IS CONSTANT GO TO (2231)II OR (2243}11 READINGS 0F POLYNOMIALS P AND Q AND INTERNALLY STORE AN INDICATION OF THE NUMBER OF TERMS IN EACH (13A6-1363)II COMPARE NUMBER OF TERMS NP OF POLYNOMIAL P wIT NUMBER OF TERMS NQ 0F POLYNOMIAL Q (136A-1365)I EXCHANGE HEADINGS AND REFERENCE LOCATIONS OF POLYNOMIALS P AND Q 3 8-1379) VERIFY THAT POLYNOMIALS P AND Q HAVE SAME FORMAT (1381-1391)II TEST POLYNOMIAL P NUMBER OF TERMS IS MONOMIAL IN MULTIPLER POLYNOMIAL (1 +I5-1A17)II GO To (2251)II POLYNOMIAL P HAS AT LEAST TWO TERMS DETERMINE DATA BUFFER STORAGE REQUIRED FOR LEAPFROG METHOD (1A18-1 427)II PATENTEDDCT 19 ml 3. 614,406

sum 17 [1F 19 FIG. 5D-2 INITIALIZE PREVIOUS ADDRESS LOCATION & ESTABLISH MINIMUM POSSIBLE DATA ADDRESS (21 4-22 0 DETERMINE 'HEADING SPACE SET INDEX REGISTER wITR INDICATION OF HEADING SPACE (232) COMPARE PRESENT ADDRESS GIVE BY READING WITH MINIMUM OSSIBLE ADDRESS MP PRESENT RETURN MINIMUM (295-297) PRESENT or MINIMUM PRESENT PREVIOUS PRESENT PREVIOUS RESENT ADDRESS WITH ERROR PREVIOUS ADDRESS RETURN PRESENT PREVI- OUS REPLACE CONTENTS OF PREVIOUS ADDRESS LOCATION BY PRESENT ADDRESS (2u2-2u3) PREPARE FOR NEXT ADDRESS GIVEN BY HEADING (2 m) UPDATE MINIMUM POSSIBLE ADDRESS (254-271) MOVE DATA TO MINIMUM POSSIBLE ADDRESS ESTABLI-SRED EARLIER AND UPDATE INTERNAL LOCATIONS (27u-291) PATENTEDUCT 1919?! 3,614,406 SHEET 180F 19 FIG. 5D-3 INITIALIZE READING ESTABLISHED FOR INDIVIDUAL TERMS OF THE MULTIPLIER POLYNOMIAL (lMLO-UMQHI T GENERATE READING FOR PARTIAL SUM (856)11 1 DUPLICATE MULTIPLICAND POLYNO- MIAL (860)11 AND (MW-49 v INITIALIZE SINGLE TERM MULTIPLICATION AND OvERwRITE SUBROUTINE (7o8-768)II I (FROM 79A) MULTIPLY COEFFICIENTS OF MULTIPLIER AND MULTIPLICAND POLYS. & STORE (7 9-77 PREPARE FOR EXPONENT ADDITION (7 -787)II ADD EXPONENT wORDs OF MULTIPLIED TERMS(788790)II CHECK ADDITION OF EXPONENT WORDS FOR OVERFLOW AND STORE 1 (791-795) ALL TERMS COMPLETED MULTIPLICAND TERMS PROCESSED TERMS REMAINING TEST FOR ALL EXPONENT EXPONENT WORDS WORDS PROCESSED REMAINING EXPONENT WORDS COMPLETED TRANSFER PARTIAL sum TO NP-TH BLOCK (862)11 and (852-867)II PATENTEDucr 19 l97l SHEET 19 0F 1 9 FIG 5E-1 CAL ACL

SLW

ERA

ERA

MASK

ANA

FIG. 5E-2 MEMORY P SZ-S 5 2 M llllll'. 00 N W AT 2 M 2 5 l -llzll .II III m P n M T M 0 m U w lllllll 0 I'll! E C E 4 R I! U N r Alll' E "I 5 G A I'IIIIIIIIIIIIIII R 0 fl 5 R r: llllllll! D D A 3 R 2 w M 5 E 0 R C Y D E D m A Nm I Y m w c II R T 0 ruk M c E .m M S N ACCUMULATOR REGISTER 

1. The machine method of processing information constituted of at least one variable and associated parameters, which comprises the steps of
 1. generating signals designating a first set of locations in a machine memory and storing the signals thus generated at a second set of locations identified with said information,
 2. generating signals designating a third set of locations in said memory and storing the signals thus generated at the memory location of said first set,
 3. generating signals representing the parameters of one variable and storing the signals thus generated at the memory location of said third set, and
 4. generating format signals indicating the format of the signals generated at step (3) and the name of the variable associated with said variable and storing said format signals at a fourth set of memory locations.
 2. generating signals designating a third set of locations in said memory and storing the signals thus generated at the memory location of said first set,
 2. storing the signals of the coefficient of sAid term at a first word location of a machine memory,
 2. generating and storing heading signals designating the location of signals generated by step (1),
 2. The method as defined in claim 1 wherein the signals generated by step (2) further designate locations of said memory for the format of said variable.
 2. generating signals indicating a fixed upper bound of said set of storage locations,
 2. generating signals representing a higher order partial product of another term of said one polynomial by all the terms of said other polynomial and storing the resulting signals at a successive block of machine storage locations,
 2. combining, for the signals thus ordered, all successive words representing like numerical magnitudes.
 3. generating signals representing a summation of the results of steps (1) and (2) and storing the result of said summation at a block of machine storage locations preceding and partially overwriting those of step (2), and
 3. generating signals indicating a variable lower bound with respect to the bound of step (1),
 3. A programmed data processing machine method of processing information constituted of at least one variable and associated parameters, which comprises the steps of
 3. generating and storing identification signals designating the location of the signals generated by step (2), and
 3. storing the signals of a first exponent of said term at a new location of said memory bearing a fixed relation to said first location,
 3. generating signals representing the parameters of one variable and storing the signals thus generated at the memory location of said third set, and
 4. generating format signals indicating the format of the signals generated at step (3) and the name of the variable associated with said variable and storing said format signals at a fourth set of memory locations.
 4. packing said new location with signals of succeeding exponents to the extent that said new location does not overflow, and
 4. generating and storing format signals for each of the signals generated at step (1).
 4. generating signals indicating a variable upper bound with respect to the bound of step (2),
 4. repeating steps (2) and (3) and, for each repetition, storing the resultant summation signals at a block of storage locations preceding and partially overwriting those of each earlier repetition.
 4. The machine method of processing information which comprises the steps of
 5. The stored-program-controlled machine method of processing polynomial information constituted of at least one term of coefficient and exponent signals, which comprises the steps of
 5. entering signals referring to the bound of step (4) into the location indicated by the bound of step (3), and
 5. repeating steps (3) and (4) with successive new locations each bearing a fixed relation to said first location, and with the next exponent not having its signals packed replacing said first exponent upon packing the previous new location to the point of imminent overflow, until all signals of a term have been stored.
 6. The machine method of processing polynomial information constituted of exponent signals stored in a plurality of word locations of a memory, which comprises the steps of
 6. updating the bound of step (3) by the extent of the signals stored according to step (5).
 7. The machine method of multiplying together two polynomials, which comprises the steps of
 8. Apparatus comprising means for storing (1) a first set of signals indicative of the packing of signals representing a plurality of distinctive quantities into groups of preassigned extent and (2) second and third sets of signals packed according to the signals of said first set, register means, means for adding the signals of said second and third sets to each other to form a sum signal, means for loading said sum signal into said register means, means for performing an EXCLUSIVE-OR operation between the contents of said register means and the signals of said second set to form a first EXCLUSIVE-OR result signal, means for storing said first EXCLUSIVE-OR result signal in said register means, means for performing an EXCLUSIVE-OR operation between said first EXCLUSIVE-OR result signal and the signals of said third set to form a second EXCLUSIVE-OR result signal, means for storing said second EXCLUSIVE-OR result signal in said register means, and means for performing an AND operation between the contents of said register means and the signals of said first set.
 9. Apparatus comprising means for adding first and second sets of digit signals, together with their carries, to form a third set of signals occupying preassigned digit positions; means for subtracting, without carries, (1) the signals of the first set from those of said third set to form a first residual set of signals and (2) the signals of the second set from those of said first residual set to form a second residual set; and means for testing the signals of said second residual set for a carry signal in one of said preassigned digit positions. 